package cn.wyl;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
@MapperScan("cn.wyl.*.mapper") //扫描mapper包下所有接口，将mapper接口交给spring管理，生成代理对象
@ServletComponentScan(value = {"cn.wyl.system.listener"})//加载Listener - 本来监听器只要服务器一启动就会执行，
// 但是SpringBoot项目中是通过启动类开启服务的，所以要加这个注解去加载listener，listener才会起作用
public class PetHomeApp {
    public static void main(String[] args) {
        SpringApplication.run(PetHomeApp.class);
    }
}
